import request from '@/utils/request'

//新增菜单
export function addMenu(data) {
    return request({
        url: 'admin/menu/addMenu',
        method: 'post',
        data
    })
}

//返回菜单
export function getUseMenuList(data) {
    return request({
        url: 'admin/menu/getUseMenuList',
        method: 'post',
        data
    })
}

// 删除菜单
export function deleteMenu(menu_id) {
    return request({
        url: 'admin/menu/deleteMenu',
        method: 'GET',
        params: menu_id
    })
}

//修改菜单
export function updateMenu(data) {
    return request({
        url: 'admin/menu/updateMenu',
        method: 'post',
        data
    })
}

//获取登录用户可使用的菜单
export function getUserMenu(data) {
    return request({
        url: 'admin/menu/getUserMenu',
        method: 'post',
        data
    })
}

//获取登录用户可使用的菜单
export function getAllmenu1(data) {
    return request({
        url: 'admin/menu/getAllmenu',
        method: 'get',
        data
    })
}


